package com.byl.sdk.utils;

public class InviteCodeUtils {
    final static String BASECODE="abcdefghijklmnopqrstuvwxyz0123456789";
    final static int MAXCODELEN=6;
    public static String generateInviteCode(){
        int len=BASECODE.length();
        StringBuilder sb=new StringBuilder();
        for(int i=0;i<MAXCODELEN;i++){
            int index=(int)Math.floor(Math.random()*len);
            sb.append(BASECODE.charAt(index));

        }

        return sb.toString();
    }
        public static void main(String[] args){
            String tmp=generateInviteCode();
            System.out.println(tmp);
        }
}
